/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.common.util.ZimbraCookie;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ClearCookie
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 37 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 38 */     HttpServletResponse servletResp = (HttpServletResponse)context.get("servlet.response");
/*    */     
/* 40 */     for (Element eCookie : request.listElements("cookie")) {
/* 41 */       String cookie = eCookie.getAttribute("name");
/* 42 */       ZimbraCookie.clearCookie(servletResp, cookie);
/*    */     }
/*    */     
/* 45 */     Element resp = zsc.createElement(AdminConstants.CLEAR_COOKIE_RESPONSE);
/* 46 */     return resp;
/*    */   }
/*    */   
/*    */   public boolean needsAdminAuth(Map<String, Object> context) {
/* 50 */     return false;
/*    */   }
/*    */   
/*    */   public boolean needsAuth(Map<String, Object> context) {
/* 54 */     return false;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 59 */     notes.add("Do not need any right, all admins are allowed.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/ClearCookie.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */